package com.example.warehousems.dao;

import com.example.warehousems.dao.model.Activity;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import java.util.List;

public interface ActivityRepository extends JpaRepository<Activity, Integer> {
    List<Activity> findAllByIsReadOrderByTimeDesc(int i);
    List<Activity> findByUserIdAndIsReadOrderByTimeDesc(Integer userId, int i);
    List<Activity> findByIdIn(int[] ids);
    Page<Activity> findByUserId(int userId, Pageable pageable);
}
